import fetch from 'common/src/utils/fetch';
import baseUrl from './env';
// 学院认定课程时间设置列表
function getList(data) {
  return fetch({
      url: `${baseUrl}/achievement/getNotDraftAndNotRollbackList`,
      method: 'post',
      data
  });
}
// 新增提交课程认定
function identificationInsert(data) {
  return fetch({
      url: `${baseUrl}/practice/submit/insert`,
      method: 'post',
      data
  });
}
// 编辑课程认定
function identificationUpdate(data) {
  return fetch({
      url: `${baseUrl}/practice/submit/update`,
      method: 'post',
      data
  });
}
// 编辑保存课程认定
function updatePreservation(data) {
  return fetch({
      url: `${baseUrl}/practice/keep/update`,
      method: 'post',
      data
  });
}
// 新增保存课程认定 （从新增或者课程认定按钮进入页面，点击保存当接口）
function insertPreservation(data) {
  return fetch({
      url: `${baseUrl}/practice/keep/insert`,
      method: 'post',
      data
  });
}
// 学院认定课程时间设置删除
function identificationDelete(data) {
  return fetch({
      url: `${baseUrl}/practice/delete`,
      method: 'post',
      data
  });
}
// 查询单个课程认定
function identificationGetOne(data) {
  return fetch({
      url: `${baseUrl}/practice/getOne`,
      method: 'post',
      data
  });
}
// 我的申请列表数据
function identificationGetList(data) {
  return fetch({
      url: `${baseUrl}/practice/getList`,
      method: 'post',
      data
  });
}

// 我的申请导出
function getDownloadList(data) {
  return fetch({
      url: `${baseUrl}/practice/download`,
      method: 'post',
      data
  });
}

// 我的待办表格数据
function getToDoList(data) {
  return fetch({
      url: `${baseUrl}/practice/schedule/getList`,
      method: 'post',
      data
  });
}
// 我的审核表格数据
function getAuditList(data) {
  return fetch({
      url: `${baseUrl}/practice/examine/getList`,
      method: 'post',
      data
  });
}
// 审核
function examine(data) {
  return fetch({
      url: `${baseUrl}/practice/examine`,
      method: 'post',
      data
  });
}
// 实践课程认定查询查询接口
function getQueryList(data) {
  return fetch({
      url: `${baseUrl}/practice/query/getList`,
      method: 'post',
      data
  });
}
// 实践课程认定统计查询接口
function getSumList(data) {
  return fetch({
      url: `${baseUrl}/practice/sum/getList`,
      method: 'post',
      data
  });
}
// 我的申请导出
function exportApplyList(data) {
  return fetch({
      url: `${baseUrl}/practice/exportList`,
      method: 'post',
      data
  });
}
// 我的待办导出
function exportToDoList(data) {
  return fetch({
      url: `${baseUrl}/practice/schedule/exportList`,
      method: 'post',
      data
  });
}
// 我的审核导出
function exportExamineList(data) {
  return fetch({
      url: `${baseUrl}/practice/examine/exportList`,
      method: 'post',
      data
  });
}
// 课程认定统计
function exportSumList(data) {
  return fetch({
      url: `${baseUrl}/practice/sum/exportList`,
      method: 'post',
      data
  });
}
// 课程认定查询
function exportQueryList(data) {
  return fetch({
      url: `${baseUrl}/practice/query/exportList`,
      method: 'post',
      data
  });
}
/**
* 获取key
*/
function exportStatus(key) {
  return fetch({
      url: `${baseUrl}/export/result/${key}`,
      method: 'get',
  });
}
const InnovationEntrepreneurshipPracticeApi = {
  getList,
  identificationInsert,
  identificationUpdate,
  updatePreservation,
  insertPreservation,
  identificationDelete,
  identificationGetOne,
  identificationGetList,
  getToDoList,
  getAuditList,
  getSumList,
  getQueryList,
  examine,
  getDownloadList,
  exportApplyList,
  exportStatus,
  exportToDoList,
  exportExamineList,
  exportSumList,
  exportQueryList
}
export default InnovationEntrepreneurshipPracticeApi;
